<?php
    
class SQL
{
	private static $instance;
	
	public function get_instance()
	{
		if( !isset($instance) )
		{
			self::$instance = new SQL();
		}
		return self::$instance;
	}
	
	public function query($req)
	{
		if (!empty($req) )
		{
			$rs = mysql_query($req);
			return $rs;
		}
	}
	
	public function assoc($str)
	{
		if ( !empty($str))
		{
			return mysql_fetch_assoc($str);
		}
	}
	
	public function to_array($str)
	{
		if (!empty($str))
		{
			return mysql_fetch_array($str);
		}
	}
}
?>